<script setup>
import router from "@/router/index.js";
import { useTokenStore } from '@/stores/token.js'
const tokenStore = useTokenStore()

const out=()=>{
  tokenStore.token=''
  router.push('/login')
}
</script>
<template>
  <div class="header-content">
    <!-- Logo 部分 -->
    <div class="logo">
      <img src="@/assets/images/logo.png" alt="Logo" />
    </div>
    <!-- 其他头部内容 -->
    <div class="header-right">
      <!--   抽取成退出方法，清楚用户信息并弹窗   -->
      <el-link style="color: white" @click="out()">退出系统</el-link>
    </div>
  </div>
</template>

<style scoped>
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Logo 和其他内容分别放置 */
  height: 100%;
  margin-left: -20px;
  margin-right: 4vh;
}

.logo {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

/* logo */
.logo img {
  height: 200px; /* 设置 Logo 高度 */
  width: auto;
}

/* 退出系统 */
.header-right {
  color: white;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* 其他内容右对齐 */
}
</style>